#include <iostream>
using namespace std;
class Base{

		public:
			virtual void tell(int) const =0;

};


class Derived1: public Base{
	public:
	void tell(int) const; // required to get ride of pure virtualness 
};

class Derived2: public Base{
	public:
	void tell(int) const;
};

void Derived1::tell(int i) const{
	cout << i << endl;
}

void Derived2::tell(int i) const{
	cout << i+2 << endl;
}

int main() {

	Derived1 d1;
	Derived2 d2;
	Base* bptr;
	bptr=&d1;
	bptr->tell(10);
	// d.tell(5);
	bptr=&d2;
	bptr->tell(10);

	return 0;
}
